Optimal. Leaf size=231 \[ -\frac {2 \left (a^2-b^2\right ) (5 b B-2 a C) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^2 d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (-2 a^2 C+5 a b B+9 b^2 C\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^2 d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {2 (5 b B-2 a C) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{15 b d}+\frac {2 C \sin (c+d x) (a+b \cos (c+d x))^{3/2}}{5 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.35, antiderivative size = 231, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.206, Rules used = {3023, 2753, 2752, 2663, 2661, 2655, 2653} \[ -\frac {2 \left (a^2-b^2\right ) (5 b B-2 a C) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^2 d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (-2 a^2 C+5 a b B+9 b^2 C\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^2 d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {2 (5 b B-2 a C) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{15 b d}+\frac {2 C \sin (c+d x) (a+b \cos (c+d x))^{3/2}}{5 b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2653
Rule 2655
Rule 2661
Rule 2663
Rule 2752
Rule 2753
Rule 3023
Rubi steps
\begin {align*} \int \sqrt {a+b \cos (c+d x)} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx &=\frac {2 C (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{5 b d}+\frac {2 \int \sqrt {a+b \cos (c+d x)} \left (\frac {3 b C}{2}+\frac {1}{2} (5 b B-2 a C) \cos (c+d x)\right ) \, dx}{5 b}\\ &=\frac {2 (5 b B-2 a C) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b d}+\frac {2 C (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{5 b d}+\frac {4 \int \frac {\frac {1}{4} b (5 b B+7 a C)+\frac {1}{4} \left (5 a b B-2 a^2 C+9 b^2 C\right ) \cos (c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx}{15 b}\\ &=\frac {2 (5 b B-2 a C) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b d}+\frac {2 C (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{5 b d}-\frac {\left (\left (a^2-b^2\right ) (5 b B-2 a C)\right ) \int \frac {1}{\sqrt {a+b \cos (c+d x)}} \, dx}{15 b^2}+\frac {\left (5 a b B-2 a^2 C+9 b^2 C\right ) \int \sqrt {a+b \cos (c+d x)} \, dx}{15 b^2}\\ &=\frac {2 (5 b B-2 a C) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b d}+\frac {2 C (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{5 b d}+\frac {\left (\left (5 a b B-2 a^2 C+9 b^2 C\right ) \sqrt {a+b \cos (c+d x)}\right ) \int \sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}} \, dx}{15 b^2 \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {\left (\left (a^2-b^2\right ) (5 b B-2 a C) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}} \, dx}{15 b^2 \sqrt {a+b \cos (c+d x)}}\\ &=\frac {2 \left (5 a b B-2 a^2 C+9 b^2 C\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^2 d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {2 \left (a^2-b^2\right ) (5 b B-2 a C) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^2 d \sqrt {a+b \cos (c+d x)}}+\frac {2 (5 b B-2 a C) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b d}+\frac {2 C (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{5 b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.88, size = 179, normalized size = 0.77 \[ \frac {2 \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \left (\left (-2 a^2 C+5 a b B+9 b^2 C\right ) \left ((a+b) E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )-a F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )\right )+b^2 (7 a C+5 b B) F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )\right )+2 b \sin (c+d x) (a+b \cos (c+d x)) (a C+5 b B+3 b C \cos (c+d x))}{15 b^2 d \sqrt {a+b \cos (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.45, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} \sqrt {b \cos \left (d x + c\right ) + a}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} \sqrt {b \cos \left (d x + c\right ) + a}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 2.61, size = 993, normalized size = 4.30 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} \sqrt {b \cos \left (d x + c\right ) + a}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \left (C\,{\cos \left (c+d\,x\right )}^2+B\,\cos \left (c+d\,x\right )\right )\,\sqrt {a+b\,\cos \left (c+d\,x\right )} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (B + C \cos {\left (c + d x \right )}\right ) \sqrt {a + b \cos {\left (c + d x \right )}} \cos {\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________